function loadAlchemy() {
  $('.append').remove()
  $('#mainContent').append(template('t_alchemy'))
  exit()
  setActionDisplay(0, 0)

  initPackag()
  var itemId
  $('.link').click(function() {
    $next = $(this).next()
    $next.slideToggle()
    $(this).parent().toggleClass('open')
    $('#accordion').find('.submenu').not($next).slideUp().parent().removeClass('open')

    $('.submenu li').click(function() {
      $('li').removeClass('active')
      $(this).toggleClass('active')
      itemId = $(this).attr('value')
      alchemyInfo(itemId)
      $('.needCon').css('display', 'block')
    })
  })

  function alchemyInfo(itemId) {
    var html = ''
    var itemConfig = templateConfig.alchemy[400001][itemId]
    var flag = 1
    var needProp = itemConfig.needProp

    var desc = templateConfig.total[itemConfig.getItem].desc
    $('.setInfo').html('<div class="desc">' + propName[itemConfig.getItem] + '<br>' + desc + '</div>')


    for (var i in needProp) {
      var Id = needProp[i][0]
      var itemNum = needProp[i][1]
      var name = propName[Id]
      var num = getTotalNumByItemId(Id)
      html += name + '(' + num + ')' + 'X' + itemNum + '<br>'
      if (num < itemNum) {
        flag = 0
      }
    }
    $('.needProp').html(html)
    if(itemConfig.needMoney){
      $('.needMoney').html('银币(' + player.basicInfo.money + ')X' + itemConfig.needMoney)
    }
    if(itemConfig.needGold){
      $('.needMoney').html('金币(' + player.basicInfo.money + ')X' + itemConfig.needGold)
    }
    if (flag === 0) {
      setActionDisplay(0, 1)
      $('.lack').html('材料不足')
      return
    }

    if(itemConfig.needMoney){
      $('.needMoney').html('银币(' + player.basicInfo.money + ')X' + itemConfig.needMoney)
      if (player.basicInfo.money < itemConfig.needMoney) {
        setActionDisplay(0, 1)
        $('.lack').html('银币不足')
        return
      }
    }

    if(itemConfig.needGold){
      $('.needMoney').html('金币(' + player.basicInfo.money + ')X' + itemConfig.needGold)
      if (player.basicInfo.gold < itemConfig.needGold) {
        setActionDisplay(0, 1)
        $('.lack').html('金币不足')
        return
      }
    }
    setActionDisplay(1, 0)

    var desc = templateConfig.total[itemConfig.getItem].desc
    $('.setInfo').html('<div class="desc">' + propName[itemConfig.getItem] + '<br>' + desc + '</div>')
  }

  $('.itemCompose').click(function() {
    request.itemCompose(itemId, function(res) {
      if(res.error === 0){
        var itemConfig = templateConfig.alchemy[400001][itemId]
        showMessage('你获得了' + propName[itemConfig.getItem])
        initPackag(function(){
          alchemyInfo(itemId)
        })
      }else if(res.error === 2){
        showMessage('你仓库满了,请先清理背包')
      }

    })
  })

  function setActionDisplay(flag1, flag2) {
    if (flag1) {
      $('.itemCompose').css('display', 'block')
    } else {
      $('.itemCompose').css('display', 'none')
    }

    if (flag2) {
      $('.lack').css('display', 'block')
    } else {
      $('.lack').css('display', 'none')
    }
  }
}
